from selenium.webdriver.common.keys import Keys
from selenium import webdriver
import time
driver = webdriver.Chrome()
driver.get('https://www.baidu.com')

element = driver.find_element_by_xpath('//*[@id="kw"]')

element.send_keys('广元地图')
time.sleep(1)
element.send_keys(Keys.CONTROL, 'a')
time.sleep(1)
element.send_keys(Keys.CONTROL, 'c')
time.sleep(1)
driver.get('https://www.so.com')
time.sleep(1)
input = driver.find_element_by_id('input')
input.send_keys(Keys.CONTROL, 'v')
time.sleep(1)
input.send_keys(Keys.ENTER)
time.sleep(1)
driver.quit()

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
kw = driver.find_element_by_id('kw')
kw.send_keys(Keys.TAB)
time.sleep(1)
kw.send_keys(Keys.TAB)
time.sleep(1)

kw.send_keys(Keys.ENTER)

time.sleep(3)

driver.quit()